home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.0
/
Video Toaster v4.0.iso
/
programs
/
documentation
/
lightwavearexx.doc
< prev
next >
Wrap
Text File
|
1993-12-13
|
6KB
|
183 lines
LightWave 3D ARexx Command Set
When LightWave 3D is first started, it opens a message port called
'LightWaveARexx.port' that can receive ARexx commands, thus allowing the program
to be externally controlled. Currently, not all LightWave functions are accessible in this
way, but the 16 supported commands are enough to accomplish remote scene loading and
rendering as well as some scene modification. Note that the shared library
'rexxapp.library' must be in the LIBS: directory for the ARexx port to work.
This document lists the currently supported commands and includes a sample ARexx
program for remote control of LightWave.
Supported Commands
CurrentObject <Object Number>
Selects the given object.
SetPoint <point number> <x> <y>
Moves a point in the current object to a new position. The point number is
an integer starting at 0 and the coordinates can be floating point values.
The object will remain changed as long as it is loaded, and the changes
will be saved if the object is saved. Moving points in this way does not
allow motion blur nor will it be visible in the preview.
AsyncMode <on/off>
If this option is on the render command will return control to the ARexx
program which called it immediately, otherwise LightWave will finish
rendering before returning. The LoadScene command also becomes
asynchronous when this mode is on. This allows laarge scenes to be loaded
without tying up the ARexx caller. This mode is particularly useful for
controlling multiple, networked machines. The following two commands are
specifically for use in asynchronous mode:
Abort
Abort rendering (just like the escape key in LightWave)
WriteStatus
This command causes LightWave to write a status file, which a controlling
program can read to determine what LightWave is working on. The status
file contains 3 numbers: the current frame being rendered, the current
segment (starting from one at the top), and the current antialiasing pass.
This command will only work if a valid status file name has been given in
the LW-config file or via the StatusFilename command.
StatusFilename <name>
This changes the directory and file name where LightWave writes status
files. A name of "(none)" disables status writing.
Antialiasing <mode>
The modes are 0=off, 1=low, 2=med, 3=high.
FilterType <type>
Currently the types are 0=default, 1=soft filter on.
FieldRendering <on/off>
Toggles field rendering.
SaveAlphaImages <image file prefix>
This command tells LightWave where to save 8-bit alpha images.
EnterModeler
This command loads (if necessary) and enters Modeler.
LoadScene <scene filename>
This command causes LightWave to clear whatever scene is in memory and load the
specified scene file. Loading and rendering of a whole series of scenes can now be
accomplished with a simple ARexx program. A more sophisticated program could
actually write new LightWave scene files and cause them to be loaded, allowing control
over functions not currently supported by their own ARexx commands.
FirstFrame <frame number>
LastFrame <frame number>
FrameStep <number of frames>
These commands can be used after a scene has been loaded to change the range of frames
to be rendered.
RayTraceEffects <ray tracing mode>
The ray tracing mode is the sum of several numbers. Starting with zero, add one if ray
traced shadows are desired, two for ray traced reflections, and four to calculate refraction.
For example, seven would turn on all effects, and five would indicate everything but
reflection. (0 = no ray tracing, 1 = Shadows, 2 = Reflections, 3 = Shadows and
Reflections, 4 = Refraction, 5 = Shadows and Refraction, 6 = Reflections and Refraction,
and 7= Shadows, Reflections, and Refraction.)
Resolution <resolution mode>
The resolution mode numbers correspond to the resolution choices on LightWave's
Camera panel, starting with zero for Super Low Res and going up to four for Print
Resolution.
Overscan <on/off>
Letterbox <on/off>
Passing a zero with either of these commands will switch off the corresponding option,
while a one switches them on.
ZenithColor <red> <green> <blue>
SkyColor <red> <green> <blue>
GroundColor <red> <green> <blue>
NadirColor <red> <green> <blue>
FogColor <red> <green> <blue>
These commands accept three numbers (in the 0 to 255 range) to indicate the red, green,
and blue color components. An ARexx program could use these commands together with
the FirstFrame, LastFrame, and Render commands to animate backdrop colors during a
scene.
SaveImages <image file prefix>
This command is used to activate the saving of IFF24 images and to specify the first part
of the image filenames. Using '(none)' as the prefix turns off image saving.
(continued)
SaveFrames <framestore comment>
This command is used to activate the saving of framestores and to specify the comment
field of the framestore filenames. Using '(none)' as the comment turns off framestore
saving.
Render <frame advance mode>
This command sets the frame advance mode to manual (if the passed value is zero) or
automatic (if the value is one), and then causes LightWave to begin rendering the scene.
Control is not returned to the ARexx program until rendering has been finished.
LightWave 3D 2.0 ARexx Example Program
The following program causes LightWave to load, modify, and render
two scenes:
/* LightWave ARexx Example Program */
address 'LightWaveARexx.port'
'LoadScene Scenes/SceneFileA'
'RayTraceEffects 2'/* turns on ray traced reflections only */
'Resolution 3'/* selects high resolution mode */
'Letterbox 1'/* turns on letterbox mode */
'SaveImages SceneA'/* activates IFF24 file saving */
'Render 1'/* starts rendering with automatic frame advance */
/* the program will automatically wait until scene A is done */
'LoadScene Scenes/SceneFileB'
'SaveFrames SceneB'/* activates framestore saving */
do i = 1 to 30/* the following loop animates the sky color */
'FirstFrame' i
'LastFrame' i
'SkyColor' 120+4*i 180-2*i 240-6*i
'Render 1'
end i
address
exit
Command List:
EnterModeler
Render
LoadScene
FirstFrame
LastFrame
FrameStep
CurrentObject
RayTraceEffects
Resolution
Overscan
Letterbox
Antialiasing
FilterType
FieldRendering
ZenithColor
SkyColor
GroundColor
NadirColor
FogColor
SaveImages
SaveAlphaImages
SaveFrames
AsyncMode
StatusFilename
EnableReqs
SetPoint
RedrawLayout
Abort
WriteStatus